<%@ page contentType="text/html;charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> 
<html:html> 
	<head>
		<META http-equiv=Content-Type content="text/html; charset=utf-8">
		<LINK href="../styles/sciencee.css"  type=text/css rel=stylesheet>
		<style type="text/css"></style>
		<title>CGProject</title>
		<html:base/>
	</head>
	<%String CurrentPage = (String)request.getAttribute("CurrentPage");%>
	<body>
			
			<table border="0" width="100%" cellspacing="1" id="table5" height="59" style="border: 1px solid #C0C0C0">
				<tr>

					<html:form action="/intoadd"><html:submit style="font-family: Tahoma; font-size: 11px"><bean:message key="employee.add"/></html:submit></html:form>
					
				</tr>
				<tr>
				<html:form action="/queryEmp">
					<td height="25" align="left" width="11%" style="border-right: 1px dotted #C0C0C0; border-bottom: 1px dotted #C0C0C0">
					&nbsp;<bean:message key="employee.name"/></td>
					<td height="25" align="left" width="88%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					&nbsp;<html:text property="empName" size="20" style="border:1px solid #C0C0C0; font-family: Tahoma; font-size: 11px" /></td>
				</tr>
				<tr>
					<td height="25" align="left" width="11%" style="border-right: 1px dotted #C0C0C0; border-bottom: 1px dotted #C0C0C0">
					&nbsp;<bean:message key="employee.gender"/></td>
					<td height="25" align="left" width="88%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					&nbsp;<html:select property="gender" style="font-family: Tahoma; font-size: 11px">
					<html:option value=""></html:option>
					<html:option value="M"><bean:message key="male"/></html:option>
					<html:option value="F"><bean:message key="female"/></html:option></html:select>
					</td>
				</tr>
				<tr>
					<td height="25" align="left" width="11%" style="border-right: 1px dotted #C0C0C0; border-bottom: 1px dotted #C0C0C0">
					&nbsp;<bean:message key="employee.sector"/></td>
					<td height="25" align="left" width="88%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					&nbsp;<html:select property="sectorId" style="font-family: Tahoma; font-size: 11px">
					<html:option value=""></html:option>
					<html:options  collection="Sectors"
								   property="sectorId"
								   labelProperty="sectorName"/>
				</html:select></td>
				</tr>
				<tr>
					<td height="25" align="left" width="11%" style="border-right: 1px dotted #C0C0C0; border-bottom: 1px dotted #C0C0C0">
					&nbsp;<bean:message key="employee.orderby"/></td>
					<td height="25" align="left" width="88%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					&nbsp;<html:select property="sortBy" style="font-family: Tahoma; font-size: 11px">				
						<html:option value=""></html:option>
						<html:option value="empName"><bean:message key="employee.name"/></html:option>
						<html:option value="employeeId" ><bean:message key="employee.idcard"/></html:option>
					</html:select>
					&nbsp;<html:select property="ascOrdesc" style="font-family: Tahoma; font-size: 11px">
						<html:option value=""></html:option>
						<html:option value="ASC"><bean:message key="asc"/></html:option>
						<html:option value="DESC" ><bean:message key="desc"/></html:option>
					</html:select></td>
				</tr>
				<tr>
					<td height="25" align="left" width="107%" style="border-right: 1px dotted #C0C0C0; border-bottom: 1px dotted #C0C0C0" colspan="2">
					<html:submit><bean:message key="employee.query"/></html:submit>
					&nbsp;<html:text property="titlePerPage" size="20" style="border:1px solid #C0C0C0; font-family: Tahoma; font-size: 11px" /><bean:message key="employee.titlepage"/>
					</td>
				</tr>
			</table>
		</html:form>

			<table border="0" width="100%" cellspacing="1" id="table6" height="59" style="border: 1px solid #C0C0C0">
				<tr>
					<td height="25" align="left" bgcolor="#EEF2F7" colspan="4" width="100%">&nbsp;<b></b></td>
				</tr>
				<tr>
					<td height="25" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					&nbsp;<b><bean:message key="employee.name"/></b></td>
					<td height="25" align="left" width="26%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					<b>&nbsp;<bean:message key="employee.sector"/></b></td>
					<td height="25" align="left" width="26%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					<b>&nbsp;<bean:message key="employee.mobileno"/></b></td>

					<td height="25" align="left" width="29%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
					&nbsp;<b></b></td>
				</tr>
				<logic:iterate id="element" name="Employees">
				<tr>
					<td height="25" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">&nbsp;<b><html:link page="/detail.do" paramId="employeeId" paramName="element" paramProperty="employeeId"><u><bean:write name="element" property="empName"/></u></html:link></b></td>
					<td height="25" align="left" width="26%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">&nbsp;<bean:write name="element" property="sector.sectorName"/></td>
					<td height="25" align="left" width="26%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">&nbsp;<bean:write name="element" property="mobileNo"/></td>
					<td height="25" align="left" width="29%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">&nbsp;
					<html:link page="/intoMod.do" paramId="employeeId" paramName="element" paramProperty="employeeId">[<bean:message key="basicmodify"/>]</html:link>&nbsp;&nbsp;
						<html:link page="/delConfirm.do" paramId="employeeId" paramName="element" paramProperty="employeeId" onclick="return   confirm('Confirm Delete')">[<bean:message key="delete"/>]</html:link></td>
				</tr>
				</logic:iterate>
		
			</table>
			<table  border="0" width="100%" cellspacing="1" id="table7" height="25">
			<tr>
			<logic:equal name="LastFlag" value="null">
				<font color=#C0C0C0><bean:message key="prepage"/>&nbsp;&nbsp;</font>
			</logic:equal>
			<logic:equal name="LastFlag" value="notNull">
				<html:link page="/index.do" name="LastPage"><font color=#990000><bean:message key="prepage"/>&nbsp;&nbsp;</font></html:link>
			</logic:equal>
			<bean:message key="page"/>
			<logic:iterate id="element" name="Paras">
			<logic:equal name="element" property="string" value="<%=CurrentPage%>">
				<font color="#FF0000">&nbsp;&nbsp;<bean:write name="element" property="string"/></font>
			</logic:equal>
			<logic:notEqual name="element" property="string" value="<%=CurrentPage%>">
				&nbsp;&nbsp;<html:link page="/index.do" name="element" property="map"><font color=#808080><bean:write name="element" property="string"/></font></html:link>
			</logic:notEqual>
			</logic:iterate>
			&nbsp;&nbsp;.
			<logic:equal name="NextFlag" value="null">
				<font color=#C0C0C0>&nbsp;&nbsp;<bean:message key="nextpage"/></font>
			</logic:equal>
			<logic:equal name="NextFlag" value="notNull">
				<html:link page="/index.do" name="NextPage"><font color=#990000>&nbsp;&nbsp;<bean:message key="nextpage"/></font></html:link>
			</logic:equal>
			</tr>
		</table>
	</body>
</html:html>

